Skip to content

Preserve func.__qualname__ when defined#130

Merged
rgbkrk merged 2 commits into
cloudpipe:masterfrom
ogrisel:fill-function-args
Nov 8, 2017
Merged

Preserve func.__qualname__ when defined#130
rgbkrk merged 2 commits into
cloudpipe:masterfrom
ogrisel:fill-function-args

Conversation

@ogrisel

@ogrisel ogrisel commented Nov 8, 2017

Copy link
Copy Markdown
Contributor

This is a followup for #128 to address @pitrou's comment: #128 (comment).

This is backward compatible with 0.4.0 and 0.4.1 and should make it easier to be forward compatible with future versions shall we need to pass additional function metadata.

@ogrisel

ogrisel commented Nov 8, 2017

Copy link
Copy Markdown
Contributor Author

@rgbkrk @pitrou if you like this I will merge and release 0.4.2 and then rebase #127 to release 0.5.0.

Comment thread cloudpickle/cloudpickle.py Outdated
func = args[0]
keys = ['globals', 'defaults', 'dict', 'closure_values']
state = dict(zip(keys, args[1:]))
state['module'] = None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to set __module__ to None? Or is it preferrable to skip it entirely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I meant to change that.

@pitrou

pitrou commented Nov 8, 2017

Copy link
Copy Markdown
Member

Kudos for doing this :-)

@codecov-io

codecov-io commented Nov 8, 2017

Copy link
Copy Markdown

Codecov Report

Merging #130 into master will decrease coverage by 5.75%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #130      +/-   ##
==========================================
- Coverage   84.09%   78.34%   -5.76%     
==========================================
  Files           2        2              
  Lines         522      531       +9     
  Branches       91       96       +5     
==========================================
- Hits          439      416      -23     
- Misses         62       84      +22     
- Partials       21       31      +10
Impacted Files Coverage Δ
cloudpickle/cloudpickle.py 78.21% <91.66%> (-5.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d8c670...11b0d33. Read the comment docs.

@rgbkrk rgbkrk merged commit 9cbb13f into cloudpipe:master Nov 8, 2017
@ogrisel ogrisel deleted the fill-function-args branch November 8, 2017 16:26
@ogrisel

ogrisel commented Nov 8, 2017

Copy link
Copy Markdown
Contributor Author

@rgbkrk thanks for the merge. Do you want to release 0.4.2 too? Or shall I do it?

@rgbkrk

rgbkrk commented Nov 8, 2017

Copy link
Copy Markdown
Member

I’d love if you can make the release.

@ogrisel

ogrisel commented Nov 8, 2017

Copy link
Copy Markdown
Contributor Author

0.4.2 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants